<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<!-- RichFaces tag library declaration -->
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>

<f:subview id="sbvMenuStudent">
	<rich:toolBar styleClass="menuAll">
		<rich:toolBarGroup>
			<rich:dropDownMenu id="studentDropDown" value="Моят профил"
				submitMode="server">
				<rich:menuItem style="width:300px;" submitMode="server"
					disabled="true">
					<h:panelGrid columns="2" style="padding-left:25px;width:320px;"
						id="gridProfileSt">
						<h:outputText value="Име:" />
						<h:outputText value="#{mbStudent.resultUser.firstName}"
							styleClass="outputTextValue" />
						<h:outputText value="Презиме:" />
						<h:outputText value="#{mbStudent.resultUser.secondName}"
							styleClass="outputTextValue" />
						<h:outputText value="Фамилия:" />
						<h:outputText value="#{mbStudent.resultUser.thirdName}"
							styleClass="outputTextValue" />
						<h:outputText value="Потребителско име:" />
						<h:outputText value="#{mbStudent.resultUser.username}"
							styleClass="outputTextValue" />
						<h:outputText value="Стара парола:" />
						<h:inputSecret value="#{mbStudent.resultUser.password}" size="15" />
						<h:outputText value="Нова парола:" />
						<h:inputSecret value="#{mbStudent.newPass}" size="15" />
						<h:outputText value="Потвърди:" />
						<h:inputSecret value="#{mbStudent.validatePass}" size="15" />
						<h:outputText value="Ел. поща:" />
						<h:inputText value="#{mbStudent.resultUser.mail}" size="15" />
					</h:panelGrid>
					<a4j:commandButton style="margin-left:100px;"
						reRender="gridProfileSt" value="Направи промените"
						action="#{mbStudent.updateProfile}" />
				</rich:menuItem>
			</rich:dropDownMenu>
		</rich:toolBarGroup>
		<rich:menuItem>
			<h:commandLink value="Виж заданието"
				action="#{mbStudent.navToPreviewTask}" />
		</rich:menuItem>
		<rich:menuItem submitMode="none">
			<a4j:commandLink value="Изпрати домашно"
				reRender="mdlPanelSendHomework"
				oncomplete="Richfaces.showModalPanel('mdlPanelSendHomework')" />
		</rich:menuItem>
		<rich:toolBarGroup location="right">
			<rich:dropDownMenu value="Търси" direction="bottom-left">
				<rich:menuItem style="width:750px;" disabled="true">
					<h:panelGrid columns="2" width="100%">
						<h:panelGrid width="100%">
							<h:outputText styleClass="outputTextValue"
								style="margin-left:27px;" value="Критерии за търсене на задание" />
							<h:panelGrid columns="2" style="margin-left:25px">
								<h:outputText value="Фамилия на преподавателя: " />
								<h:inputText size="15"
									value="#{mbStudent.searchTask.lecturer.thirdName}" />
								<h:outputText value="Име на заданието: " />
								<h:inputText size="15" value="#{mbStudent.searchTask.title}" />
								<h:outputText value="Валидно до:" styleClass="outputTextLabel" />
								<rich:calendar styleClass="outputTextValue" inputSize="15"
									value="#{mbStudent.searchTask.endDate}"
									datePattern="#{mbStudent.datePattern}" />
							</h:panelGrid>
							<rich:spacer height="5" />
							<a4j:commandButton value="Търси задание"
								reRender="studentAllTasks" action="#{mbStudent.searchTasks}"
								style="margin-left:130px" />
						</h:panelGrid>
						<h:panelGrid width="100%">
							<h:outputText styleClass="outputTextValue"
								style="margin-left:27px;"
								value="Критерии за търсене на изпратени домашни" />
							<h:panelGrid columns="2" style="margin-left:25px">
								<h:outputText value="По задание с име: " />
								<h:inputText size="15"
									value="#{mbStudent.searchHomework.task.title}" />
								<h:outputText value="Изпратена след: " />
								<rich:calendar styleClass="outputTextValue" inputSize="15"
									value="#{mbStudent.searchHomework.sentDate}"
									datePattern="#{mbStudent.datePattern}" />
							</h:panelGrid>
							<rich:spacer height="35" />
							<a4j:commandButton value="Търси домашно"
								reRender="allHomeworksForStudent"
								action="#{mbStudent.searchHomeworks}" style="margin-left:130px" />
						</h:panelGrid>
					</h:panelGrid>
				</rich:menuItem>
			</rich:dropDownMenu>
		</rich:toolBarGroup>
	</rich:toolBar>
</f:subview>